﻿using System;
using HslCommunication.Core.IMessage;

namespace HslCommunication.Profinet.Geniitek
{
	/// <summary>
	/// 完整的数据报文信息
	/// </summary>
	// Token: 0x020000A2 RID: 162
	public class VibrationSensorLongMessage : INetMessage
	{
		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ProtocolHeadBytesLength" />
		// Token: 0x170001D3 RID: 467
		// (get) Token: 0x06000C1B RID: 3099 RVA: 0x00047B33 File Offset: 0x00045D33
		public int ProtocolHeadBytesLength
		{
			get
			{
				return 12;
			}
		}

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.HeadBytes" />
		// Token: 0x170001D4 RID: 468
		// (get) Token: 0x06000C1C RID: 3100 RVA: 0x00047B37 File Offset: 0x00045D37
		// (set) Token: 0x06000C1D RID: 3101 RVA: 0x00047B3F File Offset: 0x00045D3F
		public byte[] HeadBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ContentBytes" />
		// Token: 0x170001D5 RID: 469
		// (get) Token: 0x06000C1E RID: 3102 RVA: 0x00047B48 File Offset: 0x00045D48
		// (set) Token: 0x06000C1F RID: 3103 RVA: 0x00047B50 File Offset: 0x00045D50
		public byte[] ContentBytes { get; set; }

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.CheckHeadBytesLegal(System.Byte[])" />
		// Token: 0x06000C20 RID: 3104 RVA: 0x00047B5C File Offset: 0x00045D5C
		public bool CheckHeadBytesLegal(byte[] token)
		{
			bool flag = this.HeadBytes == null;
			bool result;
			if (flag)
			{
				result = false;
			}
			else
			{
				bool flag2 = this.HeadBytes[0] == 170 && this.HeadBytes[1] == 85 && this.HeadBytes[2] == 127;
				result = flag2;
			}
			return result;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetContentLengthByHeadBytes" />
		// Token: 0x06000C21 RID: 3105 RVA: 0x00047BB4 File Offset: 0x00045DB4
		public int GetContentLengthByHeadBytes()
		{
			return (int)this.HeadBytes[10] * 256 + (int)this.HeadBytes[11] + 4;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetHeadBytesIdentity" />
		// Token: 0x06000C22 RID: 3106 RVA: 0x00047BE1 File Offset: 0x00045DE1
		public int GetHeadBytesIdentity()
		{
			return 0;
		}

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.SendBytes" />
		// Token: 0x170001D6 RID: 470
		// (get) Token: 0x06000C23 RID: 3107 RVA: 0x00047BE4 File Offset: 0x00045DE4
		// (set) Token: 0x06000C24 RID: 3108 RVA: 0x00047BEC File Offset: 0x00045DEC
		public byte[] SendBytes { get; set; }
	}
}
